/**
 * Copyright (c) 2002-2012 旭鸣信息
 * All rights reserved. 
 * File：FrontLogCouponDaoImpl.java
 * History: Dec 27, 2012: Initially created, liuzhi.
 */
package com.xteam.ecsystem.dao.Impl;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.xteam.ecsystem.dao.IFrontLogCouponDao;
import com.xteam.ecsystem.entities.LogCouponInfo;

/**
 * 前端购物券日志数据访问实现类，此接口同样使用于后台购物券日志记录!
 * @author liuzhi
 *
 */
@Repository
public class FrontLogCouponDaoImpl extends DDLPrefix implements IFrontLogCouponDao {
	
	@SuppressWarnings("unchecked")
	@Autowired
	private BaseDaoImpl baseDao;

	public void saveCouponLog(String lciMember, String lciCoupon, double lciPrice, int lciIncrement,
			String lciRemark) {
		try {
			LogCouponInfo lci = new LogCouponInfo();
			lci.setLciMember(lciMember);
			lci.setLciCoupon(lciCoupon);
			lci.setLciPrice(lciPrice);
			lci.setLciIncrement(lciIncrement);
			lci.setLciRemark(lciRemark);
			lci.setLciTime(new Date());
			
			this.baseDao.save(lci);
			
		} catch (Exception e) {
			e.printStackTrace();
		}
		
	}

	

}
